load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//packages/ic-error-types",
    "//rs/config",
    "//rs/crypto/test_utils/reproducible_rng",
    "//rs/cycles_account_manager",
    "//rs/embedders",
    "//rs/execution_environment",
    "//rs/interfaces",
    "//rs/interfaces/state_manager",
    "//rs/limits",
    "//rs/monitoring/logger",
    "//rs/monitoring/metrics",
    "//rs/query_stats",
    "//rs/registry/provisional_whitelist",
    "//rs/registry/routing_table",
    "//rs/registry/subnet_features",
    "//rs/registry/subnet_type",
    "//rs/replicated_state",
    "//rs/test_utilities",
    "//rs/test_utilities/types",
    "//rs/types/base_types",
    "//rs/types/management_canister_types",
    "//rs/types/types",
    "//rs/types/types_test_utils",
    "//rs/types/wasm_types",
    "//rs/universal_canister/lib",
    "@crate_index//:bincode",
    "@crate_index//:maplit",
    "@crate_index//:num-traits",
    "@crate_index//:prometheus",
    "@crate_index//:strum",
    "@crate_index//:tempfile",
    "@crate_index//:tokio",
    "@crate_index//:wat",
]

MACRO_DEPENDENCIES = [
    # Keep sorted.
    "@crate_index//:strum_macros",
]

rust_library(
    name = "execution_environment",
    testonly = True,
    srcs = glob(["src/**"]),
    crate_name = "ic_test_utilities_execution_environment",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.9.0",
    deps = DEPENDENCIES,
)

rust_test(
    name = "execution_environment_test",
    crate = ":execution_environment",
    deps = DEPENDENCIES,
)

rust_doc_test(
    name = "execution_environment_doc_test",
    crate = ":execution_environment",
    deps = DEPENDENCIES,
)
